package cn.tuling.service;

import cn.tuling.mybatis.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Component
public class UserService {

    @Autowired
    private UserMapper userMapper;

    @Autowired
    private UserService userService;

    @Transactional
    public void test() {
        userMapper.insertOne();
        userService.testTwo();
    }

    public void testTwo() {
        userMapper.insertTwo();
    }
}
